package com.molichuxing.gateway.api.services;


import com.molichuxing.framework.dto.Paged;
import com.molichuxing.framework.dto.TabDto;
import com.molichuxing.framework.result.ResponseResult;
import com.molichuxing.gateway.bff.permission.entity.response.*;
import com.molichuxing.services.infrastructure.dto.response.response.ResourceDto;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;

/**
 * @prouect_name: op-gateway
 * @class_name: ${CLASS_NAME}
 * @description: ${DESCRIPTION}
 **/
public interface PermissionApiService {


	/**
	 * 账户登录
	 * 
	 * @param params
	 * @return
	 */
	public ResponseResult<AccountLoginVo> login(Map<String, Object> params);

	/**
	 * 账户登出
	 *
	 * @return
	 */
	public ResponseResult<Boolean> logOut();


	/**
	 * 根据查询条件，查询后台用户
	 * @param params
	 * @return
	 */
	public ResponseResult<Paged<AccountVo>> getAccount(Map<String, Object> params, int pageNum, int pageSize);

	/**
	 * 创建新用户
	 * @param vo
	 * @return
	 */
	public ResponseResult<Boolean> createAccount(AccountCreateVo vo);



	/**
	 * 修改用户
	 * @param vo
	 * @return
	 */
	public ResponseResult<Boolean> modifyAccount(AccountModifyVo vo);



	/**
	 * 重置密码
	 * @param vo
	 * @return
	 */
	public ResponseResult<Boolean> modifyResetPassword(@RequestBody AccountModifyVo vo);


	/**
	 * 修改密码
	 * @param vo
	 * @return
	 */
	public ResponseResult<Boolean> modifyPassword(ModifyPassowrdVo vo);

	/**
	 * 根据查询条件，查询角色列表（带分页）
	 * @param param
	 * @param pageNum
	 * @param pageSize
	 * @return
	 */
	public ResponseResult<Paged<GroupVo>> getGroupList(Map<String, Object> param, int pageNum, int pageSize);

	public ResponseResult<Boolean> createGroup(GroupCreateVo vo);

	public ResponseResult<Boolean> modifyGroup(GroupModifyVo vo);

	public ResponseResult<OpGroupAndIovGroupVo> getGroupListInModifyAccountPage(int systemType, String account, int dealerId);

	/**
	 * 通过角色，获得权限树
	 * @param groupId
	 * @param groupSystemType
	 * @return
	 */
	public ResponseResult<GroupBindResourceVo> getPermissionTree(int groupId, int groupSystemType);

	public ResponseResult<Paged<DesenseVo>> getDesenseByGroupId(int groupId);


	/**
	 * 创建角色与脱敏字段的关联
	 * @return
	 */
	public ResponseResult<Boolean> createBatchGroupDesense(GroupBindVo vo);

	/**
	 * 创建角色与权限的关联
	 * @return
	 */
	public ResponseResult<Boolean> createBatchGroupResource(GroupBindVo vo);


	/**
	 * 获得op左侧菜单树
	 *
	 * @return
	 */
	public ResponseResult<List<ResourceDto>> getMenuList();

	/**
	 * 登录日志列表
	 *
	 * @param params
	 * @param pageNum
	 * @param pageSize
	 * @return
	 */
	public ResponseResult<Paged<AccountLoginLogVo>> getLoignLog(Map<String, Object> params,
	                                                            Integer pageNum, Integer pageSize);

	/**
	 * 根据权限id获取页签列表
	 * @param permissionId
	 * @return
	 */
	public ResponseResult<List<TabVo>> getTabList(Integer permissionId);

	/**
	 * 获取操作日志列表信息
	 * @param map
	 * @param pageNum
	 * @param pageSize
	 * @return
	 */
	ResponseResult<Paged<OperationLogVo>> getOperationLog(Map<String, Object> map, Integer pageNum, Integer pageSize);
}
